/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.carpark.servicies;

import cz.muni.fi.pa165.carpark.TO.ServiceCheckTO;
import cz.muni.fi.pa165.carpark.TO.VehicleTO;
import java.util.List;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;

/**
 *
 * @author xmarton1
 */
@WebService
public interface ServiceCheckService {

    /*
     * Creates new ServiceCheck entity in database
     * 
     * @param serviceCheck ServiceCheck to create
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public void createCheck(@WebParam(name = "check") ServiceCheckTO serviceCheck);

    /*
     * Retrieves ServiceCheck fromtransfer object  database
     * 
     * @param id Id of retrieved ServiceCheck
     * @return ServiceCheckDTO 
     * @throws DataRetrievalFailureException in case some error od persistence layer.
     */
    public ServiceCheckTO retrieveCheck(@WebParam(name = "id") Long id);

    /*
     * Update ServiceCheck transfer object 
     * @param serviceCheck ServiceCheck transfer object to update
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public void updateCheck(@WebParam(name = "check") ServiceCheckTO serviceCheck);

    /*
     * Delete ServiceCheck from database
     * @param serviceCheck to be deleted
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    void deleteCheck(@WebParam(name = "check") ServiceCheckTO serviceCheck);

    
    /*
     *Set the check as done and create new one in the database
     *@param serviceCheck to be done
     */
    void cancelCheck(@WebParam(name = "check") ServiceCheckTO serviceCheck);
    
    
    /*
     * Return all ServiceCheck transfer objects
     * @return List<ServiceCheckDTO> List of all ServiceChecks.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    List<ServiceCheckTO> retrieveAllServiceChecks();

    /*
     * Return all ServiceCheck transfer objects for vehicle
     * @return List<ServiceCheckDTO> List of all ServiceChecks for Vehicle.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public VehicleTO findServiceCheckVehicle(@WebParam(name = "check") ServiceCheckTO check);
    
    /*
     * Return all ServiceCheck transfer by active
     * @return List<ServiceCheckDTO> List of ServiceChecks.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public List<ServiceCheckTO> getServiceChecksByActive(@WebParam(name = "active")boolean active);
       
    /*
     * Return all ServiceCheck transfer by done
     * @return List<ServiceCheckDTO> List of ServiceChecks.
     * @throws DataAccessResourceFailureException in case some error od persistence layer.
     */
    public List<ServiceCheckTO> getServiceChecksByDone(@WebParam(name = "done")boolean done);
}
